package com.lumlord.model.auto.dictionary;

import java.io.Serializable;

import com.lumlord.common.annotation.pojo.IgnoreColumn;
import com.lumlord.common.annotation.pojo.PK;
import com.lumlord.common.annotation.pojo.Table;
import com.lumlord.common.base.BaseEntity;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.Date;
import java.lang.Integer;
import java.util.List;


/**
 * 数据字典表 Dictionary
 *
 * @author pdd_自动生成
 * @email pengdingding@lumlord.com
 * @date 2020-04-21 13:42:24
 */
@Table(value = "t_dictionary", DB = "yw_setting_service")
public class Dictionary extends BaseEntity implements Serializable {
	@IgnoreColumn
    private static final long serialVersionUID = 1L;


    /**
     * 主键，编码
     **/
    @PK("id")
    private Integer id;

    /**
     * 上级分类id
     **/
    private Integer parentId;

    /**
     * 级别
     **/
    private Integer lev;

    /**
     * 字段
     **/
    private String fieldName;

    /**
     * 值
     **/
    private String val;

    /**
     * 启用状态0启用，1未启用
     **/
    private Integer enableState;

    /**
     * 修改人
     **/
    private Integer modifyUser;

    /**
     * 操作时间
     **/
    private Date modifyTime;

    /**
     * 状态0删除，1未删除，可扩展（3，不可删除的数据）
     **/
    private Integer dataState;

    /**
     * 上级数据字典名称
     */
    private String parentName;

    private List<Dictionary> child;
    @IgnoreColumn
    private boolean isopen = false;

    public boolean isIsopen() {
        return isopen;
    }

    public void setIsopen(boolean isopen) {
        this.isopen = isopen;
    }

    public String getParentName() {
        return parentName;
    }

    public void setParentName(String parentName) {
        this.parentName = parentName;
    }

    public List<Dictionary> getChild() {
        return this.child;
    }

    public void setChild(List<Dictionary> child) {
        this.child = child;
    }

    public void addChild(Dictionary Dictionary) {
        if (this.child == null) {
            this.setChild(new ArrayList());
        }

        this.getChild().add(Dictionary);
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }


    public Integer getParentId() {
        return parentId;
    }

    public void setParentId(Integer parentId) {
        this.parentId = parentId;
    }


    public Integer getLev() {
        return lev;
    }

    public void setLev(Integer lev) {
        this.lev = lev;
    }


    public String getFieldName() {
        return fieldName;
    }

    public void setFieldName(String fieldName) {
        this.fieldName = fieldName;
    }


    public String getVal() {
        return val;
    }

    public void setVal(String val) {
        this.val = val;
    }


    public Integer getEnableState() {
        return enableState;
    }

    public void setEnableState(Integer enableState) {
        this.enableState = enableState;
    }


    public Integer getModifyUser() {
        return modifyUser;
    }

    public void setModifyUser(Integer modifyUser) {
        this.modifyUser = modifyUser;
    }


    public Date getModifyTime() {
        return modifyTime;
    }

    public void setModifyTime(Date modifyTime) {
        this.modifyTime = modifyTime;
    }


    public Integer getDataState() {
        return dataState;
    }

    public void setDataState(Integer dataState) {
        this.dataState = dataState;
    }


    public Dictionary() {
        super();
    }

}